package com.longteng.common.config.exception;

import com.longteng.common.result.ResultCodeEnum;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author shkstart
 * @Description
 * @create 2024--01--08--11:57
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRoleException extends RuntimeException{

    private Integer code;
    private String msg;
//自己设置的枚举类
    public  SysRoleException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
        this.msg = resultCodeEnum.getMessage();
    }
}
